package com.stlm2.dems.dao.impl;

import org.springframework.stereotype.Repository;

import com.stlm2.dems.entity.Inventory;
import com.stlm2.dems.dao.InventoryDao;
import com.stlm2.core.base.impl.BaseDaoImpl;

import java.util.HashMap;
import java.util.Map;

@Repository("inventoryDao")
public class InventoryDaoImpl extends BaseDaoImpl<Inventory> implements InventoryDao {
    @Override
    public Inventory getOnlyInventory(int shopId, int goodsId, Integer goodSpecificationId) {
        Map<String,Integer> map=new HashMap<String, Integer>();
        map.put("shopId",shopId);
        map.put("goodsId",goodsId);
        map.put("goodSpecificationId",goodSpecificationId==null?0:goodSpecificationId);
        return selectOne("getOnlyInventory",map);
    }
}